﻿<UserControl x:Class="Dsl.Ped.AddIn.Beeps.Projections.LinkedListProjection.LinkedListProjection"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:pouc="clr-namespace:Dsl.Ped.Framework.WPFControls.ProjectiveObject;assembly=DslPedFramework"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        
        <ListBox ItemsSource="{Binding Path=Commands}"
                 Focusable="False"
                 BorderThickness="0"
                 Width="150"
                 HorizontalAlignment="Center"
                 Background="Transparent"
                 Name="lstBox"
                 Grid.Row="0">
            <ListBox.ItemContainerStyle>
                <Style TargetType="{x:Type ListBoxItem}">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="55"/>
                                    </Grid.RowDefinitions>
                                    <Border CornerRadius="55,55,55,55" Grid.Row="0" Margin="0,0,0,0" BorderBrush="Black" BorderThickness="3">
                                        <Border.Background>
                                            <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                                                <GradientStop Color="Green" Offset="0" />
                                                <GradientStop Color="LightGreen" Offset="0.5" />
                                                <GradientStop Color="#FFFFFFFF" Offset="1" />
                                            </LinearGradientBrush>
                                        </Border.Background>
                                        <!--<Label Height="50" Content="{Binding}" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"/>-->
                                        <pouc:ProjectiveObjectUserControl 
                                              Grid.Row="1"
                                              Width="50"
                                              HorizontalAlignment="Center"
                                              ProjectiveObject="{Binding}"/>
                                    </Border>

                                    <Image Source="pack://application:,,,/DSLPedAddIn_Beeps;component/Resources/Images/arrow_down.png" Grid.Row="1" Margin="0,0,0,0"/>
                                    <!--<Label Width="10" Background="Black" HorizontalAlignment="Center" Grid.Row="1"/>-->
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </ListBox.ItemContainerStyle>
        </ListBox>

        <Button Grid.Row="1" FontSize="40" Width="50" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Content="+"
                Click="Button_Click">
            <Button.Background>
                <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                    <GradientStop Color="Green" Offset="0" />
                    <GradientStop Color="LightGreen" Offset="0.5" />
                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                </LinearGradientBrush>
            </Button.Background>
        </Button>     
    </Grid>
</UserControl>
